package com.jinlejia.erp.ui.house.prospect.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author 王进 on 2019/1/21.
 */

public class ServeyResultBean implements Parcelable{

    private String applyCode;               //实勘编码

    private String rsCode;                  //房源编码
    private String rejectReason;            //驳回原因
    private String purpose;                 //用途
    private int room;                       //室 int
    private int hall;                       //厅 int
    private int toilet;                     //卫 int
    private int kitchen;                    //厨 int

    private List<RoomBean> roomList;        //室
    private List<RoomBean> hallList;        //厅

    public List<RoomBean> getUndergroundList() {
        return undergroundList;
    }

    public void setUndergroundList(List<RoomBean> undergroundList) {
        this.undergroundList = undergroundList;
    }

    public List<RoomBean> getAtticList() {
        return atticList;
    }

    public void setAtticList(List<RoomBean> atticList) {
        this.atticList = atticList;
    }

    private List<RoomBean> toiletList;      //卫
    private List<RoomBean> kitchenList;     //厨

    private List<RoomBean> balconyList;     //阳台
    private List<RoomBean> parking;         //车位
    private List<RoomBean> yard;            //院
    private List<RoomBean> storageList;     //储物间
    private List<RoomBean> cloakroomList;   //衣帽间
    private List<RoomBean> laundryList;     //洗衣间

    private RoomBean       layout;          //户型图

    private List<RoomBean> gazeboList;      //露台
    private List<RoomBean> building;        //楼体正面全景
    private List<RoomBean> vestibuleList;   //玄关
    private List<RoomBean> bonneList;       //保姆间
    private List<RoomBean> sunRoom;         //阳光房
    private List<RoomBean> playRoom;        //游戏室
    private List<RoomBean> cardRoom;        //棋牌室

    private List<RoomBean> exterior;        //楼体外景
    private List<RoomBean> lobby;           //大堂
    private List<RoomBean> outdoor;         //室外风景图
    private List<RoomBean> street;          //街景
    private List<RoomBean> doorway;         //门头
    private List<RoomBean> inroomList;      //室内照片集合
    private List<RoomBean> undergroundList;      //地下室照片集合
    private List<RoomBean> atticList;      //阁楼照片集合
    private String reason;                  //顶替理由
    public ServeyResultBean(){
        //empty
    }

    protected ServeyResultBean(Parcel in) {
        applyCode = in.readString();
        rsCode = in.readString();
        rejectReason = in.readString();
        purpose = in.readString();
        room = in.readInt();
        hall = in.readInt();
        toilet = in.readInt();
        kitchen = in.readInt();
        roomList = in.createTypedArrayList(RoomBean.CREATOR);
        hallList = in.createTypedArrayList(RoomBean.CREATOR);
        toiletList = in.createTypedArrayList(RoomBean.CREATOR);
        kitchenList = in.createTypedArrayList(RoomBean.CREATOR);
        balconyList = in.createTypedArrayList(RoomBean.CREATOR);
        parking = in.createTypedArrayList(RoomBean.CREATOR);
        yard = in.createTypedArrayList(RoomBean.CREATOR);
        storageList = in.createTypedArrayList(RoomBean.CREATOR);
        cloakroomList = in.createTypedArrayList(RoomBean.CREATOR);
        laundryList = in.createTypedArrayList(RoomBean.CREATOR);
        layout = in.readParcelable(RoomBean.class.getClassLoader());
        gazeboList = in.createTypedArrayList(RoomBean.CREATOR);
        building = in.createTypedArrayList(RoomBean.CREATOR);
        vestibuleList = in.createTypedArrayList(RoomBean.CREATOR);
        bonneList = in.createTypedArrayList(RoomBean.CREATOR);
        sunRoom = in.createTypedArrayList(RoomBean.CREATOR);
        playRoom = in.createTypedArrayList(RoomBean.CREATOR);
        cardRoom = in.createTypedArrayList(RoomBean.CREATOR);
        exterior = in.createTypedArrayList(RoomBean.CREATOR);
        lobby = in.createTypedArrayList(RoomBean.CREATOR);
        outdoor = in.createTypedArrayList(RoomBean.CREATOR);
        street = in.createTypedArrayList(RoomBean.CREATOR);
        doorway = in.createTypedArrayList(RoomBean.CREATOR);
        inroomList = in.createTypedArrayList(RoomBean.CREATOR);
        undergroundList =  in.createTypedArrayList(RoomBean.CREATOR);
        atticList =  in.createTypedArrayList(RoomBean.CREATOR);
        reason = in.readString();
    }

    public static final Creator<ServeyResultBean> CREATOR = new Creator<ServeyResultBean>() {
        @Override
        public ServeyResultBean createFromParcel(Parcel in) {
            return new ServeyResultBean(in);
        }

        @Override
        public ServeyResultBean[] newArray(int size) {
            return new ServeyResultBean[size];
        }
    };

    public String getApplyCode() {
        return applyCode;
    }

    public void setApplyCode(String applyCode) {
        this.applyCode = applyCode;
    }

    public String getRsCode() {
        return rsCode;
    }

    public void setRsCode(String rsCode) {
        this.rsCode = rsCode;
    }

    public String getRejectReason() {
        return rejectReason;
    }

    public void setRejectReason(String rejectReason) {
        this.rejectReason = rejectReason;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public int getRoom() {
        return room;
    }

    public void setRoom(int room) {
        this.room = room;
    }

    public int getHall() {
        return hall;
    }

    public void setHall(int hall) {
        this.hall = hall;
    }

    public int getToilet() {
        return toilet;
    }

    public void setToilet(int toilet) {
        this.toilet = toilet;
    }

    public int getKitchen() {
        return kitchen;
    }

    public void setKitchen(int kitchen) {
        this.kitchen = kitchen;
    }

    public List<RoomBean> getRoomList() {
        return roomList;
    }

    public void setRoomList(List<RoomBean> roomList) {
        this.roomList = roomList;
    }

    public List<RoomBean> getHallList() {
        return hallList;
    }

    public void setHallList(List<RoomBean> hallList) {
        this.hallList = hallList;
    }

    public List<RoomBean> getToiletList() {
        return toiletList;
    }

    public void setToiletList(List<RoomBean> toiletList) {
        this.toiletList = toiletList;
    }

    public List<RoomBean> getKitchenList() {
        return kitchenList;
    }

    public void setKitchenList(List<RoomBean> kitchenList) {
        this.kitchenList = kitchenList;
    }

    public List<RoomBean> getBalconyList() {
        return balconyList;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public void setBalconyList(List<RoomBean> balconyList) {
        this.balconyList = balconyList;
    }

    public List<RoomBean> getParking() {
        return parking;
    }

    public void setParking(List<RoomBean> parking) {
        this.parking = parking;
    }

    public List<RoomBean> getYard() {
        return yard;
    }

    public void setYard(List<RoomBean> yard) {
        this.yard = yard;
    }

    public List<RoomBean> getStorageList() {
        return storageList;
    }

    public void setStorageList(List<RoomBean> storageList) {
        this.storageList = storageList;
    }

    public List<RoomBean> getCloakroomList() {
        return cloakroomList;
    }

    public void setCloakroomList(List<RoomBean> cloakroomList) {
        this.cloakroomList = cloakroomList;
    }

    public List<RoomBean> getLaundryList() {
        return laundryList;
    }

    public void setLaundryList(List<RoomBean> laundryList) {
        this.laundryList = laundryList;
    }

    public RoomBean getLayout() {
        return layout;
    }

    public void setLayout(RoomBean layout) {
        this.layout = layout;
    }

    public List<RoomBean> getGazeboList() {
        return gazeboList;
    }

    public void setGazeboList(List<RoomBean> gazeboList) {
        this.gazeboList = gazeboList;
    }

    public List<RoomBean> getBuilding() {
        return building;
    }

    public void setBuilding(List<RoomBean> building) {
        this.building = building;
    }

    public List<RoomBean> getVestibuleList() {
        return vestibuleList;
    }

    public void setVestibuleList(List<RoomBean> vestibuleList) {
        this.vestibuleList = vestibuleList;
    }

    public List<RoomBean> getBonneList() {
        return bonneList;
    }

    public void setBonneList(List<RoomBean> bonneList) {
        this.bonneList = bonneList;
    }

    public List<RoomBean> getSunRoom() {
        return sunRoom;
    }

    public void setSunRoom(List<RoomBean> sunRoom) {
        this.sunRoom = sunRoom;
    }

    public List<RoomBean> getPlayRoom() {
        return playRoom;
    }

    public void setPlayRoom(List<RoomBean> playRoom) {
        this.playRoom = playRoom;
    }

    public List<RoomBean> getCardRoom() {
        return cardRoom;
    }

    public void setCardRoom(List<RoomBean> cardRoom) {
        this.cardRoom = cardRoom;
    }

    public List<RoomBean> getExterior() {
        return exterior;
    }

    public void setExterior(List<RoomBean> exterior) {
        this.exterior = exterior;
    }

    public List<RoomBean> getLobby() {
        return lobby;
    }

    public void setLobby(List<RoomBean> lobby) {
        this.lobby = lobby;
    }

    public List<RoomBean> getOutdoor() {
        return outdoor;
    }

    public void setOutdoor(List<RoomBean> outdoor) {
        this.outdoor = outdoor;
    }

    public List<RoomBean> getStreet() {
        return street;
    }

    public void setStreet(List<RoomBean> street) {
        this.street = street;
    }

    public List<RoomBean> getDoorway() {
        return doorway;
    }

    public void setDoorway(List<RoomBean> doorway) {
        this.doorway = doorway;
    }

    public List<RoomBean> getInroomList() {
        return inroomList;
    }

    public void setInroomList(List<RoomBean> inroomList) {
        this.inroomList = inroomList;
    }

    public SurveyPictureBean toBean(){
        SurveyPictureBean bean = new SurveyPictureBean();
        bean.setRscode(rsCode);             //房源编码
        bean.setRejectReason(rejectReason); //驳回原因
        bean.setPurpose(purpose);           //用途

        bean.setRoom(roomList);             //室
        bean.setHall(hallList);             //厅
        bean.setToilet(toiletList);         //卫
        bean.setKitchen(kitchenList);       //厨

        bean.setBalcony(balconyList);       //阳台
        bean.setParkingSpace(parking);      //车位
        bean.setYard(yard);                 //院
        bean.setLockerRoom(storageList);    //储物间
        bean.setCloakRoom(cloakroomList);   //衣帽间
        bean.setLaundryRoom(laundryList);   //洗衣间

        if (layout!=null){
            bean.setApartment(layout.getUrl()); //户型图
        }

        bean.setTerrace(gazeboList);        //露台
        bean.setBuilding(building);         //楼体正面全景
        bean.setVestibule(vestibuleList);   //玄关
        bean.setNannyRoom(bonneList);       //保姆间
        bean.setSunRoom(sunRoom);           //阳光房
        bean.setPlayRoom(playRoom);         //游戏室
        bean.setChessRoom(cardRoom);        //棋牌室

        bean.setOutdoorScene(exterior);     //楼体外景
        bean.setLobby(lobby);               //大堂
        bean.setScenery(outdoor);           //室外风景图
        bean.setStreetScape(street);        //街景
        bean.setDoorWay(doorway);           //门头
        bean.setIndoor(inroomList);         //室内照片集合
        bean.setUnderground(undergroundList);         //地下室照片集合
        bean.setAttic(atticList);         //阁楼照片集合
        bean.setApplyCode(applyCode);       //实勘编码
        return bean;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(applyCode);
        dest.writeString(rsCode);
        dest.writeString(rejectReason);
        dest.writeString(purpose);
        dest.writeInt(room);
        dest.writeInt(hall);
        dest.writeInt(toilet);
        dest.writeInt(kitchen);
        dest.writeTypedList(roomList);
        dest.writeTypedList(hallList);
        dest.writeTypedList(toiletList);
        dest.writeTypedList(kitchenList);
        dest.writeTypedList(balconyList);
        dest.writeTypedList(parking);
        dest.writeTypedList(yard);
        dest.writeTypedList(storageList);
        dest.writeTypedList(cloakroomList);
        dest.writeTypedList(laundryList);
        dest.writeParcelable(layout,flags);
        dest.writeTypedList(gazeboList);
        dest.writeTypedList(building);
        dest.writeTypedList(vestibuleList);
        dest.writeTypedList(bonneList);
        dest.writeTypedList(sunRoom);
        dest.writeTypedList(playRoom);
        dest.writeTypedList(cardRoom);
        dest.writeTypedList(exterior);
        dest.writeTypedList(lobby);
        dest.writeTypedList(outdoor);
        dest.writeTypedList(street);
        dest.writeTypedList(doorway);
        dest.writeTypedList(inroomList);
        dest.writeTypedList(undergroundList);
        dest.writeTypedList(atticList);
    }
}
